package com.newgrand.annexserver.beans;

import com.baomidou.mybatisplus.enums.IdType;

import java.util.Date;

import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.enums.IdType;
import com.baomidou.mybatisplus.activerecord.Model;

import java.io.Serializable;

/**
 * <p>
 * 业务端连接及存储策略配置
 * </p>
 *
 * @author minyang
 * @since 2019-09-06
 */
public class Dbconfig extends Model<Dbconfig> {

    private static final long serialVersionUID = 1L;

    @TableId(value = "phid", type = IdType.AUTO)
    private Long phid;
    /**
     * db标识
     */
    private String dbtoken;
    /**
     * 业务数据库url
     */
    private String url;
    /**
     * 业务数据库驱动名
     */
    private String driverClassName;
    /**
     * 业务数据库用户名
     */
    private String username;
    /**
     * 业务数据库密码
     */
    private String password;
    /**
     * 存储策略
     * 1:mysql 2:oracle 3:sqlserver 4:mongo 5:文件存储
     */
    private Integer storeStratetype;
    /**
     * 存储url
     */
    private String storeUrl;
    /**
     * 存储驱动名
     */
    private String storeDriverClassName;
    /**
     * 存储地址
     */
    private String storeHost;
    /**
     * 存储端口
     */
    private String storePort;
    /**
     * 存储用户名
     */
    private String storeUsername;
    /**
     * 存储密码
     */
    private String storePassword;
    private Date createtime;
    private Date updatetime;
    private Integer state;


    public Long getPhid() {
        return phid;
    }

    public void setPhid(Long phid) {
        this.phid = phid;
    }

    public String getDbtoken() {
        return dbtoken;
    }

    public void setDbtoken(String dbtoken) {
        this.dbtoken = dbtoken;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public String getDriverClassName() {
        return driverClassName;
    }

    public void setDriverClassName(String driverClassName) {
        this.driverClassName = driverClassName;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public Integer getStoreStratetype() {
        return storeStratetype;
    }

    public void setStoreStratetype(Integer storeStratetype) {
        this.storeStratetype = storeStratetype;
    }

    public String getStoreUrl() {
        return storeUrl;
    }

    public void setStoreUrl(String storeUrl) {
        this.storeUrl = storeUrl;
    }

    public String getStoreDriverClassName() {
        return storeDriverClassName;
    }

    public void setStoreDriverClassName(String storeDriverClassName) {
        this.storeDriverClassName = storeDriverClassName;
    }

    public String getStoreHost() {
        return storeHost;
    }

    public void setStoreHost(String storeHost) {
        this.storeHost = storeHost;
    }

    public String getStorePort() {
        return storePort;
    }

    public void setStorePort(String storePort) {
        this.storePort = storePort;
    }

    public String getStoreUsername() {
        return storeUsername;
    }

    public void setStoreUsername(String storeUsername) {
        this.storeUsername = storeUsername;
    }

    public String getStorePassword() {
        return storePassword;
    }

    public void setStorePassword(String storePassword) {
        this.storePassword = storePassword;
    }

    public Date getCreatetime() {
        return createtime;
    }

    public void setCreatetime(Date createtime) {
        this.createtime = createtime;
    }

    public Date getUpdatetime() {
        return updatetime;
    }

    public void setUpdatetime(Date updatetime) {
        this.updatetime = updatetime;
    }

    public Integer getState() {
        return state;
    }

    public void setState(Integer state) {
        this.state = state;
    }

    @Override
    protected Serializable pkVal() {
        return this.phid;
    }

    @Override
    public String toString() {
        return "Dbconfig{" +
                ", phid=" + phid +
                ", dbtoken=" + dbtoken +
                ", url=" + url +
                ", driverClassName=" + driverClassName +
                ", username=" + username +
                ", password=" + password +
                ", storeStratetype=" + storeStratetype +
                ", storeUrl=" + storeUrl +
                ", storeDriverClassName=" + storeDriverClassName +
                ", storeHost=" + storeHost +
                ", storePort=" + storePort +
                ", storeUsername=" + storeUsername +
                ", storePassword=" + storePassword +
                ", createtime=" + createtime +
                ", updatetime=" + updatetime +
                ", state=" + state +
                "}";
    }
}
